Merge vcpu phase 2
authordjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Mon, 19 Sep 2005 17:08:20 +0000 (11:08 -0600)
committerdjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Mon, 19 Sep 2005 17:08:20 +0000 (11:08 -0600)
commit286f47e0ac672c039328947caf9eaf1b236a5dbd
treea8844b171dfde44d5360529f285175fb39f31685
parentabe0d573b20fb28174704ab1848f98a564e59bb3
Merge vcpu phase 2
Signed-off-by Anthony Xu <Anthony.xu@intel.com>
1. Add r4,r5,r6,r7,eml_unat,rfi_pfs six members at the end of pt_regs,
   thus VMM for non-VT domain doesn't need to save/restore SWITCH_STACK
   just in case VMM may need modify guest r4,r5,r6,r7 value, eml_unat is saved
   in case VMM may need modify guest unat, rfi_pfs is used to emulate guest rfi
   instruction for VT domain, and is used as dummy member for alignment of F6,
   F7 etc. in pt_regs for non-VT domain. And add code to save/restore r4,r5,r6,
   r7,eml_unat in minstate.h and entry.s for non-VT domain. and remove code to
   save/restore SWITCH_STACK in ivt.S for non-VT domain.
2. Originally guest banked registers of VT domain are saved directly in VPD. Now
   Guest banked registers of VT domain are saved to pt_regs at the entry of VMM,
   just for consistence with non-VT domain, vmx_vcpu_bsw0 and vmx_vcpu_bsw1 are
   rewriten for accomodating this change.
3. After above changes, all guest registers and nat bits are saved at same place
   both for VTI domain and for non-VTI domain, so vcpu_get/set_gr and rse_get/set_gr
   are merged, and all these functions can handle guest nats.
4. Merged vcpu_bsw0 and vcpu_bsw1, Now VMM used vgr[16],vbgr[16],vnat,vbnat in mapped_regs_t
   struct (is also vpd) to emuate guest banking switch operation.
5. Removed some CONFIG_VTIs and cleaned up some unused structure members and codes.

Note: Credit accidentally omitted from merge vcpu phase 1, included here:

This patch is based on ver 6723. And definitely I can boot dom0 with this patch.
Following things are done in this patch.
1. Merge structure pt_reg.
2. Though vcpu_info structure has been merged, non-vt domain used pointer
   vcpu->vcpu_info->arch.privregs, and vt domain used pointer
   vcpu->arch.arch_vmx.vpd, the value of these two pointers are different,
   that means vt and non-vt domain still use different privileged registers
   pages, in this case, we can't merge vcpu.c, so I merged these two pointer,
   and put it at vcpu->arch.privregs. vcpu->vcpu_info->arch.privregs and
   vcpu->arch.arch_vmx.vpd  will not exist. Why put it at vcpu->arch.privregs?
   1. There will be one less pointer unreferenced when accessing this
      privileged registers page.
   2. vcpu->vcpu_info can be accessed by guest, but guest can't access
      privileged registers page through this address, guest can access
      this privileged page only through another special mapping. So there
      is no need to expose this pointer to guest by putting it in
      vcpu->vcpu_info structure. All accesses to this page is through
      VCPU(vcpu,y) macro,
3. Merged following functions.
      Vcpu_set/get_(interruption control registers from cr16 to cr25),
        corresponding functions vmx_vcpu_set/get_*** will not exist.
      Vcpu->arch.arch_vmx.in_service[4] will not exist, we will all use
      vcpu->arch.insvc[4]
4. Cleaned up some unused structure members and codes.

Signed-off-by Anthony Xu <Anthony.xu@intel.com>
30 files changed:
xen/arch/ia64/asm-offsets.c
xen/arch/ia64/linux-xen/entry.S
xen/arch/ia64/linux-xen/entry.h
xen/arch/ia64/linux-xen/minstate.h
xen/arch/ia64/linux-xen/unaligned.c
xen/arch/ia64/vmx/mmio.c
xen/arch/ia64/vmx/pal_emul.c
xen/arch/ia64/vmx/vmmu.c
xen/arch/ia64/vmx/vmx_entry.S
xen/arch/ia64/vmx/vmx_hypercall.c
xen/arch/ia64/vmx/vmx_interrupt.c
xen/arch/ia64/vmx/vmx_ivt.S
xen/arch/ia64/vmx/vmx_minstate.h
xen/arch/ia64/vmx/vmx_process.c
xen/arch/ia64/vmx/vmx_vcpu.c
xen/arch/ia64/vmx/vmx_virt.c
xen/arch/ia64/vmx/vtlb.c
xen/arch/ia64/xen/domain.c
xen/arch/ia64/xen/ivt.S
xen/arch/ia64/xen/privop.c
xen/arch/ia64/xen/process.c
xen/arch/ia64/xen/vcpu.c
xen/include/asm-ia64/ia64_int.h
xen/include/asm-ia64/privop.h
xen/include/asm-ia64/vcpu.h
xen/include/asm-ia64/vmx_vcpu.h
xen/include/asm-ia64/vmx_vpd.h
xen/include/asm-ia64/xenkregs.h
xen/include/asm-ia64/xensystem.h
xen/include/public/arch-ia64.h